﻿@{
    Layout = "~/_ContentLayout.cshtml";
}

@section headerBody {
    <h1>Understanding Packages</h1>
    <p class="lead">Boxstarter installs are a "mash-up" of Chocolatey packages mixed with specific customizations and scripts to wire-up these packages to create a complete environment.</p>
        
    <h4>If you are familiar with the basic objectives of Nuget and Chocolatey technologies. You can skip this page, but it is important to understand in order to comprehend how Boxstarter installs work.</h4>
}
<h3>What's a package and why does that matter to Boxstarter?</h3>
<p>Boxstarter leverage's <a href="http://chocolatey.org">Chocolatey</a> packages to compose the applications, components and features that make up the Windows environment you aim to create. Chocolatey is based on <a href="http://nuget.org">Nuget</a> packages. Nuget provides a standardized way of describing a reusable piece of software. Every Nuget package includes a *.nuspec file which is a manifest that declares the package's version, its dependencies and other descriptive information that assists package consumers to easily discover packages they are looking for. It includes a set of conventions for structuring the files inside of a package and naming them to assist third party software to consume these packages and know what to install based on the environment that wants to install the package.</p>
<p>Nuget in its original and currently most basic implementation is largely centered around the integration of code libraries that another application wants to use. As an application author, I would otherwise need to find a library that provides the functionality I need, and possibly any libraries that library depends on, and so forth. As the versions of these libraries advance, I need to decide if I want to upgrade and if so, how that will affect its compatibility with the other libraries I consume. Nuget addresses a lot of this pain and helps to keep application authors informed when the libraries they consumed are updated.</p>
<p>Chocolatey extends Nuget's scope to the system or machine level. Instead of managing the dependencies of library packages that will be compiled into a single application, Chocolatey focuses on managing the applications that are consumed by a machine, and the other applications those applications depend on. While most Chocolatey packages focus on applications one would install on a computer, these can be any piece of state that can be required by a package. They could be a set of registry keys, a PowerShell module, a Windows Feature such as IIS or MSMQ or an ad-hoc script that needs to be executed in order to bring a machine into the state that is required by a environment in order for it to accomplish its purpose.</p>
<p>To learn more about Nuget and Chocolatey flavored Nuget packages, please check out the <a href="http://docs.nuget.org">Nuget.org docs</a> and the <a href="https://github.com/chocolatey/chocolatey/wiki">chocolatey.org wiki</a>.</p>
<p>While a typical Chocolatey package contains code involved to silently install an application with no user intervention, Boxstarter packages are usually made up of several calls to Chocolatey's <code>cinst</code> command to install all the applications that an environment requires. However, it may also contain quite a bit of custom code needed to wire these applications together and customize the environment. For example, Boxstarter packages might:</p>
<ul>
    <li>Create IIS sites, port bindings and Certificate setup for an individual IIS web application.</li>
    <li>Configure Firewall rules for applications that need to listen on specific ports.</li>
    <li>Tweak various windows settings to make a machine personalized to a users tastes.</li>
    <li>Install critical Windows updates.</li>
    <li>Manipulate configuration files, toggle WMI settings and start (or stop) services needed for an environment to function.</li>
</ul>
